get Closest Frame Or Dialog Ancestor
Returns the nearest Frame or JDialog that is an ancestor to the given component. If no JDialog or Frame is found then return the top-most component ancestor.
Returns the nearest Frame or JDialog that is an ancestor to the given component. If no JDialog or Frame is found then return the top-most component ancestor.